<div id="content_header">
  <h3>Register a new Room</h3>
</div>

<div class="row">
  <form name="roomForm" role="form" ng-submit="addRoom()">

    <div class="form-group" ng-class="{ 'has-error': errors.Code}">
    <label class="required" for="Code">Code</label>
      <input type="text" name="Code" class="form-control" id="Code" placeholder="Room Code" ng-model="roomNew.Code" required>
      <error-widget field="errors.Code"></error-widget>
    </div>

    <div class="form-group" ng-class="{ 'has-error': errors.Name}">
      <label class="required" for="Name">Name</label>
      <input type="text" name="Name" class="form-control" id="Name" placeholder="Room Name" ng-model="roomNew.Name" required>
      <error-widget field="errors.Name"></error-widget>
    </div>

    <div class="form-group" ng-class="{ 'has-error': errors.Capacity}">
      <label class="required" for="Capacity">Capacity</label>
      <input type="number" name="Capacity" class="form-control" id="Capacity" placeholder="Room Capacity" min="1" ng-model="roomNew.Capacity" required>
      <error-widget field="errors.Capacity"></error-widget>
    </div>

    <button type="submit" class="btn btn-primary" >Submit</button>
  </form>
</div>